using UnityEngine;

public class FireworkScript : MonoBehaviour
{
	private float timer;

	private bool play;

	public SpriteRenderer spr;

	public void _Play()
	{
		play = true;
		spr.enabled = true;
		SoundScript.Instance.playClip_fireWork();
	}

	private void Update()
	{
		if (play && Time.timeScale < 0.01f)
		{
			timer += Time.unscaledDeltaTime;
			if (timer > 5f)
			{
				timer = 0f;
				play = false;
			}
		}
	}

	public void resetGO()
	{
		timer = 0f;
		play = false;
		spr.enabled = false;
	}
}
